<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <script type="text/javascript">
    var m = 3;
    var n = 3;
    if (m == n) {//值相等就可以
      console.log('m==n')
    }
    if (m === n) {//值相等，类型也要相等
      console.log('m===n')
    }

    var str1 = 'Hello JS and Java';
    console.log(str1.indexOf('J'));//6
    console.log(str1.indexOf('JS'));//6
    console.log(str1.indexOf('JS', 7));//-1
    var str2 = 'how are you doing today';
    var array = str2.split(' ');
    console.log(array);
    console.log(array[0]);
    console.log('1:2:3:4'.split(':'));

    console.log('-----------------')
    if (true) {
      console.log('true');
    }
    if (0) {//false
      console.log('0');
    }
    if (!0) {//true
      console.log('!0');
    }
    if ('') {//false
      console.log('空字符串');
    }
    if ('abc') {//true
      console.log('abc');
    }
  </script>
</head>
<body>

</body>
</html>